Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a FP in explicit_counter_loop #6076

Merged
merged 1 commit into from
Sep 24, 2020

Conversation

rail-rain
Copy link
Contributor

Fixes #4677 and #6074

Fix a false positive in explicit_counter_loop where the loop counter is used after incremented, adjust the test so that counters are incremented at the end of the loop and add the test for this false positive.


changelog: Fix a false positive in explicit_counter_loop where the loop counter is used after incremented

Fix a false positive in `explicit_counter_loop` where the loop counter is used after incremented,
adjust the test so that counters are incremented at the end of the loop
and add the test for this false positive.
@rust-highfive
Copy link

r? @matthiaskrgr

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Sep 22, 2020
@matthiaskrgr
Copy link
Member

Shouldn't we keep some tests where the counters are incremented at the start of the loop?

@rail-rain
Copy link
Contributor Author

I've added an new one (theissue_4677 module) for it. I thought existing ones had different purposes; so, if I didn't move these println!, it would be doing two negative checks at the same time.

@matthiaskrgr
Copy link
Member

Thanks!
@bors r+

@bors
Copy link
Contributor

bors commented Sep 24, 2020

📌 Commit 5e393c7 has been approved by matthiaskrgr

@bors
Copy link
Contributor

bors commented Sep 24, 2020

⌛ Testing commit 5e393c7 with merge 019c0d5...

@bors
Copy link
Contributor

bors commented Sep 24, 2020

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: matthiaskrgr
Pushing 019c0d5 to master...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties
Projects
None yet
Development

Successfully merging this pull request may close these issues.

explicit_counter_loop produces incorrect advice
4 participants